import request from '@/utils/request'

// 查询认证审核列表
export function listCertificationReview(query) {
  return request({
    url: '/personnel/certificationReview/list',
    method: 'get',
    params: query
  })
}

// 查询认证审核详细
export function getCertificationReview(id) {
  return request({
    url: '/personnel/certificationReview/' + id,
    method: 'get'
  })
}

// 新增认证审核
export function addCertificationReview(data) {
  return request({
    url: '/personnel/certificationReview',
    method: 'post',
    data: data
  })
}

// 修改认证审核
export function updateCertificationReview(data) {
  return request({
    url: '/personnel/certificationReview',
    method: 'put',
    data: data
  })
}

// 删除认证审核
export function delCertificationReview(id) {
  return request({
    url: '/personnel/certificationReview/' + id,
    method: 'delete'
  })
}

//审核通过
export function approvalCertificationReviewStatus(id){
  return request({
    url: '/personnel/certificationReview/approvalCertificationReviewStatus/'+id,
    method: 'put'
  })
}

//审核拒绝
export function rejectCertificationReviewStatus(data){
  return request({
    url: '/personnel/certificationReview/rejectCertificationReviewStatus',
    method: 'put',
    data:data
  })
}

// 根据认证审核的外键查询快递员认证的详细信息
export function getCourierCertification(id) {
  return request({
    url: '/personnel/certificationReview/selectCourierCertificationReviewByPid/'+id,
    method: 'get'
  })
}

//根据认证审核的外键查询实名认证的详细信息
export function getRealNameCertification(id) {
  return request({
    url: '/personnel/certificationReview/selectRealNameCertificationReviewByPid/'+id,
    method: 'get'
  })
}
